package test.common.core.validation;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import web.common.core.validation.annotation.FieldEqual;
import web.common.core.validation.annotation.FieldNotBlank;
import web.common.core.validation.group.GetGroup;
import web.common.core.validation.group.SaveGroup;

/**
 * @author Jin Zheng
 * @since 1.0 2020-06-23
 */
@Getter
@Setter
@NoArgsConstructor
@FieldEqual(fields = {"password", "rePassword"}, groups = {SaveGroup.class}, message = "2次密码不一致")
@FieldNotBlank(fields = {"id", "name"}, groups = {GetGroup.class}, message = "ID和用户名不能全部为空")
public class User {
	private Integer id;
	private String name;

	private String password;
	private String rePassword;

}
